﻿namespace ufida.u9.ait.openapi
{
	using System;
	using System.Collections.Generic;
	using System.Text;
    using ufida.u9.ait.openapi.utils;
    using UFIDA.U9.ER.ReimburseBill;
    using UFSoft.UBF.AopFrame;	
	using UFSoft.UBF.Util.Context;

	/// <summary>
	/// ReimburseBillSaveSV partial 
	/// </summary>	
	public partial class ReimburseBillSaveSV 
	{	
		internal BaseStrategy Select()
		{
			return new ReimburseBillSaveSVImpementStrategy();	
		}		
	}
	
	#region  implement strategy	
	/// <summary>
	/// Impement Implement
	/// 
	/// </summary>	
	internal partial class ReimburseBillSaveSVImpementStrategy : BaseStrategy
	{
		public ReimburseBillSaveSVImpementStrategy() { }

		public override object Do(object obj)
		{						
			ReimburseBillSaveSV bpObj = (ReimburseBillSaveSV)obj;

			return CodeUtils.DocSaveNT(bpObj, bpObj.Data,
				ReimburseBillBase.CreateDoc,
				(doc) =>
				{
                    ReimburseBillBase.SubmitDoc(doc);
                    ReimburseBillBase.ApproveDoc(doc);
                    return doc;
				},
                ReimburseBillBase.DeleteDoc);
		}		
	}

	#endregion
	
	
}